Certain types of communications systems such as factory automation and automobile electrical systems utilize what is known as a broadcast bus. In a broadcast bus system, many devices are connected to a common physical interface. Messages are transmitted between various nodes of the broadcast bus by including within each message packet a field, designated generally as an identifier field, which provides address information corresponding to one or more nodes. In order for a particular node to determine whether the broadcast message is addressed to it, it examines certain critical bits of the identifier and compares these bits to stored values. In such broadcast systems, a node may be able to recognize and respond to multiple identifiers. One type of broadcast bus system is known as a controller area network (CAN) and is defined by the BOSCH specification dated September 1991. CAN bus systems are especially useful in automotive applications where many devices such as sensors, motor controllers, and the like are controlled through a common physical bus.
Typically, communications processors which connect to broadcast buses and which recognize multiple identifiers have required significant overhead to validate a message. As used here, the term "validate" means to determine whether the message is addressed to that node by determining whether the identifier matches one or more corresponding identifiers defined for that node. For example, upon recognizing an identifier field of a message on the broadcast bus, a conventional communications processor must perform a series of comparison operations. For each operation, such conventional system would be required to fetch a mask corresponding to an identifier which is associated with that node. The mask would be input to a first input of a comparator. Also input to the comparator is the identifier, and the output of the comparator indicates whether the message is valid for that node. After this comparison is done, the CPU would fetch a second mask and perform a similar comparison, repeating the operation until all potential identifier masks have been compared to the identifier, or until a match is found.
This operation requires a significant amount of processing overhead. Each time the identifier is received, the broadcast bus interface circuitry interrupts the communications processor's central processing unit (CPU). In response to the interrupt, the CPU places certain information on the stack, requiring many clock cycles. The CPU must fetch instructions which load the mask's address into an index register. The result of this overhead is that the speed of the broadcast bus is limited. For example the CAN protocol specifies bus operation at 1 megahertz (MHz). However processing limitations, such as the use of inexpensive 8-bit microcontrollers, may limit the bus speed to a fraction of 1 MHz.
An alternative known technique for performing message validation uses multiple comparators. Each comparator has a first input hard-wired to a corresponding mask register. The second input of the comparator receives the identifier of the current frame. The comparator which detects a match then signals an interrupt to the CPU, which then performs further processing. While not requiring the same amount of overhead as the method described above, this method does require a significant amount of integrated circuit area for the extra comparators.
What is needed then is a data processing system which is able to validate messages quickly and with a minimum amount of hardware. Such a data processing system and a method for performing such message validation is provided by the present invention, whose features and advantages will become apparent with reference to the detailed description and the accompanying drawings.